home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / integer_gc.doc < prev    next >
Text File  |  1999-10-30  |  5KB  |  152 lines

  1. TABLE OF CONTENTS
  2.  
  3. integer_gc/--datasheet--
  4. integer_gc/INTEGER_GetClass
  5. integer_gc/--datasheet--                             integer_gc/--datasheet--
  6.  
  7.      NAME
  8.         integer_gc -- A numeric entry gadget with arrows.
  9.  
  10.      SUPERCLASS
  11.         gadgetclass
  12.  
  13.     REQUIRES
  14.         bevel.image
  15.  
  16.      DESCRIPTION
  17.         This gadget is a special form of a strggclass gadget for entering
  18.         positive or negative long integers.  The user can type in the number
  19.         or use the arrows to adjust the number up or down.
  20.  
  21.         Advantages that this class provides:
  22.  
  23.          > Supports window relativity.
  24.  
  25.          > Optionally creates arrows for adjusting the value.
  26.  
  27.          > Definable minimum and maximum values as well as maximum number
  28.            of characters.
  29.  
  30.          > Supports OS 3.0 BOOPSI Gadget HelpTest.
  31.  
  32.      METHODS
  33.         OM_NEW -- Create the integer gadget.  Passed to superclass.
  34.  
  35.         OM_SET -- Set object attributes.  Passed to superclass first.
  36.  
  37.         OM_DISPOSE -- Cancels the integer menu before being passed onto
  38.             superclass.
  39.  
  40.         OM_UPDATE -- Set object notification attributes.  Passed to superclass
  41.             first.
  42.  
  43.         GM_RENDER -- Renders the gadget imagry.  Overrides the superclass.
  44.  
  45.         GM_GOACTIVE -- Handles activation, pops up the integer menu.  Overrides
  46.             the superclass.
  47.  
  48.         GM_HANDLEINPUT -- Handles input events once active.  Overrides the
  49.             superclass.
  50.  
  51.         GM_GOINACTIVE -- Closes the integer menu.  Overrides the superclass.
  52.  
  53.         All other methods are passed to the superclass.
  54.  
  55.      ATTRIBUTES
  56.         GA_Disabled (BOOL)
  57.             Set to TRUE to disable gadget, FALSE otherwise
  58.  
  59.             Defaults to FALSE.
  60.  
  61.             Applicability is (OM_NEW, OM_SET, OM_GET)
  62.  
  63.         GA_TextAttr (struct TextAttr *)
  64.             Font to use for the gadget text.
  65.  
  66.             Defaults to the screen's font.
  67.  
  68.             Applicability is (OM_NEW, OM_SET, OM_GET)
  69.  
  70.         INTEGER_Number (LONG)
  71.             The value for the integer gadget.  The class will adjust this
  72.             number to fit into the range you define.  The current value for
  73.             INTEGER_Number will be returned in IntuiMessage.Code on
  74.             IDCMP_GADGETUP as a WORD.  Note that since the gadget handles
  75.             values of size LONG, the value returned in IntuiMessage.Code
  76.             will only be valid if the ranges you are allowing fit into a
  77.             WORD value.  Otherwise you will have to use GetAttr().
  78.  
  79.             Defaults to 0.
  80.  
  81.             Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)
  82.  
  83.         INTEGER_MaxChars (WORD)
  84.             Maximum number of characters you are allowing the number to be.
  85.             This is including an optional negative sign (-).
  86.  
  87.             Defaults to 10.
  88.  
  89.             Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)
  90.  
  91.         INTEGER_Minimum (LONG)
  92.             Minimum value the number can have.
  93.  
  94.             Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)
  95.  
  96.         INTEGER_Maximum (LONG)
  97.             Maximum value the number can have.
  98.  
  99.             Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)
  100.  
  101.         INTEGER_Arrows (BOOL)
  102.             Should arrows be displayed for adjusting the number?  The class
  103.             is smart enough to not render arrows if the gadget becomes too
  104.             small.
  105.  
  106.             Defaults to TRUE.
  107.  
  108.             Applicability is (OM_NEW, OM_SET, OM_GET)
  109.  
  110.         INTEGER_MinVisible (UWORD)
  111.             If set, this tag specifies the minimum number of numeric
  112.             characters which should be visible at the gadgets minimum
  113.             domain size. This tag effects GM_DOMAIN's result to tweak
  114.             the display in a pleasing way.
  115.  
  116.             Defaults to 0.
  117.  
  118.             Applicability is (OM_NEW, OM_SET)
  119.  
  120.         All strggclass tags can be used with OM_NEW, OM_SET and OM_GET
  121.         except for STRINGA_LongVal and STRINGA_MaxChars.  Use INTEGER_Number
  122.         and INTEGER_MaxChars instead.
  123. integer_gc/INTEGER_GetClass                       integer_gc/INTEGER_GetClass
  124.  
  125.     NAME
  126.         INTEGER_GetClass -- Gets the pointer to the integer class.
  127.  
  128.     SYNOPSIS
  129.         integer_class = INTEGER_GetClass();
  130.         D0
  131.  
  132.         Class * INTEGER_GetClass(VOID);
  133.  
  134.     FUNCTION
  135.         Obtains the pointer to the Integer gadget class for use with
  136.         NewObject().  This function always returns a valid pointer so
  137.         you do not need to check it.  The reason is that if the library
  138.         opens fine, then the pointer returned is already setup.  (Of course
  139.         this implies that if opening the library fails, you shouldn't be
  140.         calling this.)
  141.  
  142.         Note that this function does not create the class, that is done
  143.         when the class library is opened.
  144.  
  145.     INPUTS
  146.         Nothing.
  147.  
  148.     RESULT
  149.         integer_class - Pointer to the Integer gadget class.
  150.  
  151.     SEE ALSO
  152.